package cn.zhuo.knowledge.util.hutool.date;

import cn.hutool.core.date.DateUtil;

/**
 * <p>
 *
 * @author z2huo
 */
class Test {
    public static void main(String[] args) {
        String dateString = "2024-07-16";
        String dateTimeString = "2024-07-16 09:24:23";

        String newDateString = DateUtil.format(DateUtil.parse(dateString), "yyyyMMdd");
        System.out.println(newDateString);
        newDateString = DateUtil.format(DateUtil.parse(dateTimeString), "yyyyMMdd");
        System.out.println(newDateString);
    }
}
